// pages/shop/shop.js
var request = require('../../utils/https.js');
var uri = 'user/shop_info.html';
Page({

  /**
   * 页面的初始数据
   */
  data: {
    name:'',
    tel:'',
    address:'',
    img:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    request.req(uri,
      {
        user_id:wx.getStorageSync('userId'),
        id: options.id
      }
      ,(err,res)=>{
        var data=res.data;
        that.setData({
          name: data.list.real_name,
          tel: data.list.mobile,
          address: data.list.address,
          img: data.list.img_path,
        })
      })
    
  }
})